﻿using AutoMapper;
using HomeCloudStorageSystem.Dtos;
using HomeCloudStorageSystem.Models;

namespace HomeCloudStorageSystem.Profiles
{
    public class DiaryProfile:Profile
    {
        public DiaryProfile()
        {
            CreateMap<DiaryForCreationDto, Diary>()
                .ForMember(
                dist => dist.CreateTime,
                opt => opt.MapFrom(src => DateTime.Now.ToString("yyyy-MM-dd"))
                );
        }
    }
}
